/****************************************************************************************/
/*  disassembler.c: source code for translating encoded binary to a decoded structure   */
/****************************************************************************************/

/*Edited version as of 2/7/2012*/

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

#include "DecodedStructs.h"
#include "disassembler.h"
#include "FileReader.h"

void disassembler(ILIST *L)
{
	IENTRY *e = NULL;
	e=L->First;
	while(e)
	{
		INST u=NULL;
		u.instruction = e->instruction;
		setOpcode(u, e->DeInstruction);
		setRegisters(u, e->DeInstruction);
		e=e->Next;
	}

	return;
}

/*int main(void)
{
	INSTU u;

	DECODED *DeInst=CreateDeInst();
	printf("Enter hex: ");
	u.instruction = 0x3c041000;

	disassembler(u, DeInst);
	char * x=DeInst->opcode;
	char *y=DeInst->reg1;
	printf("%s %s ", DeInst->opcode, DeInst->reg1);

	if(DeInst->reg2) printf("%s ", DeInst->reg2);
	if(DeInst->reg3) printf("%s ", DeInst->reg3);
	printf("\n");
		
	return 0;
}*/


